home *** CD-ROM | disk | FTP | other *** search
Lisp/Scheme | 1988-01-09 | 579 b | 19 lines | [TEXT/ttxt] |
- ; This function prints each its arguments to *standard-output* using the
- ; PRINC function except that a T will result in the start of a new line.
- ; For example:
- ; (msg 12 " squared is " 144 t)
- ; results in:
- ; 12 squared is 144
- ; It was inspired by an XLISP bug report submitted by Ed Folger.
- ;
-
- (provide 'msg)
-
- (defmacro msg (&rest args)
- (do ((next args (cdr next))
- (form nil))
- ((null next) `(progn ,@(reverse form)))
- (cond ((eq (car next) t)
- (setq form (cons '(terpri) form)))
- (t (setq form (cons `(princ ,(car next)) form))))))
-